package com.design.mediator.shopcenter;

import java.util.HashMap;
import java.util.Map;

// 具体中介者类
class ShoppingMall implements ShoppingMallMediator {
    private Map<Shop, Integer> shopRentInfo = new HashMap<>();
    private Map<Shop, String> shopPromotionInfo = new HashMap<>();

    @Override
    public void rentSpace(Shop shop, int area) {
        shopRentInfo.put(shop, area);
        System.out.println(shop.getName() + " rented " + area + " sq. ft. space.");
    }

    @Override
    public void promoteShop(Shop shop, String promotion) {
        shopPromotionInfo.put(shop, promotion);
        System.out.println(shop.getName() + " promoted: " + promotion);
    }
}
